chain rule twice to take the derivative of an expression